home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_chrdir.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
722b
|
37 lines
#include <stdio.h>
#include <dos.h>
struct CHARDIRECT {
unsigned type;
int xht,yht,xwd,ywd;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_chardirection(int xheight,int yheight,int xwidth,int ywidth)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct CHARDIRECT chdir;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=10;
gdata.chdir.type=0x5208;
gdata.chdir.xht=xheight;
gdata.chdir.yht=yheight;
gdata.chdir.xwd=xwidth;
gdata.chdir.ywd=ywidth;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}